-- GENERATED SPELL FOR [Anub'ar Webspinner] --


function spell0_29335(pUnit, Event) --@Web Shot,n/a--
pUnit:FullCastSpellOnTarget(54290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29335', 7000, 1)
end

function spell1_29335(pUnit, Event) --@Web Shot,n/a--
pUnit:FullCastSpellOnTarget(59362,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29335', 7000, 1)
end

function spell2_29335(pUnit, Event) --@Web Wrap,n/a--
pUnit:FullCastSpellOnTarget(52086,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29335', 3295, 1)
end

function Sorts_29335(pUnit, Event)
local choix_sorts_29335 = math.random(0, 2)
if choix_sorts_29335 == 0 then
pUnit:RegisterEvent('spell0_29335', 1, 1)
end
if choix_sorts_29335 == 1 then
pUnit:RegisterEvent('spell1_29335', 1, 1)
end
if choix_sorts_29335 == 2 then
pUnit:RegisterEvent('spell2_29335', 1, 1)
end
end

function mob29335_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29335', math.random(1500, 3000), 1)
end

function mob29335_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29335_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29335_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29335, 1, 'mob29335_Action')
RegisterUnitEvent(29335, 2, 'mob29335_Leave')
RegisterUnitEvent(29335, 3, 'mob29335_Kill')
RegisterUnitEvent(29335, 4, 'mob29335_Die')
